Skip to content

Migrate to uv#960

Draft
acroca wants to merge 1 commit intodapr:mainfrom
acroca:migrate-to-uv
Draft

Migrate to uv#960
acroca wants to merge 1 commit intodapr:mainfrom
acroca:migrate-to-uv

Conversation

@acroca
Copy link
Member

@acroca acroca commented Mar 13, 2026

Description

Please explain the changes you've made

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@acroca acroca force-pushed the migrate-to-uv branch 2 times, most recently from c705df2 to 4158f64 Compare March 13, 2026 14:30
@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.06%. Comparing base (bffb749) to head (7163516).
⚠️ Report is 93 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #960      +/-   ##
==========================================
+ Coverage   86.63%   89.06%   +2.43%     
==========================================
  Files          84      104      +20     
  Lines        4473     7410    +2937     
==========================================
+ Hits         3875     6600    +2725     
- Misses        598      810     +212     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the repository’s Python packaging and CI/dev workflows from tox + setup.cfg/requirements files to a uv-managed workspace driven by pyproject.toml, updating docs and GitHub Actions accordingly.

Changes:

  • Replace tox/dev-requirements.txt/mypy.ini/setup.cfg with pyproject.toml (PEP 621 + dependency groups + mypy/ruff config) and a uv workspace.
  • Add per-extension pyproject.toml files and adjust extension setup.py scripts for dev vs release publishing.
  • Update CI workflows and docs to use uv sync / uv run (including example validation via mechanical-markdown).

Reviewed changes

Copilot reviewed 32 out of 33 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tox.ini Removed tox-based env orchestration.
setup.py Stops declaring py.typed via package_data (moved to pyproject.toml).
setup.cfg Removed legacy setuptools metadata/deps (moved to pyproject.toml).
pyproject.toml Adds project metadata/deps, uv workspace + dependency groups, ruff + mypy config.
mypy.ini Removed mypy config file (moved to pyproject.toml).
ext/flask_dapr/setup.py Removes setup.cfg parsing; introduces hard-coded stable_requires + dev overrides.
ext/flask_dapr/setup.cfg Removed legacy extension metadata/deps.
ext/flask_dapr/pyproject.toml New PEP 621 metadata/deps for flask extension + uv workspace source.
ext/dapr-ext-workflow/setup.py Same migration pattern for workflow extension.
ext/dapr-ext-workflow/setup.cfg Removed legacy extension metadata/deps.
ext/dapr-ext-workflow/pyproject.toml New PEP 621 metadata/deps for workflow extension + uv workspace source.
ext/dapr-ext-strands/setup.py Same migration pattern for strands extension.
ext/dapr-ext-strands/setup.cfg Removed legacy extension metadata/deps.
ext/dapr-ext-strands/pyproject.toml New PEP 621 metadata/deps for strands extension + uv workspace source.
ext/dapr-ext-langgraph/setup.py Same migration pattern for langgraph extension.
ext/dapr-ext-langgraph/setup.cfg Removed legacy extension metadata/deps.
ext/dapr-ext-langgraph/pyproject.toml New PEP 621 metadata/deps for langgraph extension + uv workspace source.
ext/dapr-ext-grpc/setup.py Same migration pattern for grpc extension.
ext/dapr-ext-grpc/setup.cfg Removed legacy extension metadata/deps.
ext/dapr-ext-grpc/pyproject.toml New PEP 621 metadata/deps for grpc extension + uv workspace source.
ext/dapr-ext-fastapi/setup.py Same migration pattern for fastapi extension.
ext/dapr-ext-fastapi/setup.cfg Removed legacy extension metadata/deps.
ext/dapr-ext-fastapi/pyproject.toml New PEP 621 metadata/deps for fastapi extension + uv workspace source.
examples/validate.sh Runs mechanical-markdown via uv run.
dev-requirements.txt Removed (replaced by dependency groups in pyproject.toml).
README.md Updates dev instructions to uv-based workflow.
AGENTS.md Updates repo contributor instructions to uv-based workflow.
.github/workflows/validate_examples.yaml Uses uv to install deps and runs examples/validate.sh directly.
.github/workflows/build.yaml Uses uv for lint/typecheck/tests.
.github/workflows/build-tag.yaml Uses uv for lint/typecheck/tests; removes tox install in publish env.
.github/workflows/build-push-to-main.yaml Uses uv for lint/typecheck/tests; removes tox install in publish env.
.codecov.yml Updates ignored environment directory from .tox to .venv.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@acroca acroca force-pushed the migrate-to-uv branch 2 times, most recently from a3ff39d to 4f777db Compare March 18, 2026 13:25
@acroca acroca requested a review from Copilot March 18, 2026 13:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the repository’s packaging, dependency management, and CI/test execution from tox/setup.cfg/dev-requirements.txt to a uv + pyproject.toml-driven workflow, including converting each extension into a uv workspace member with its own pyproject.toml.

Changes:

  • Replace setup.cfg/mypy.ini/dev-requirements.txt/tox.ini with pyproject.toml configuration and uv dependency groups/workspace.
  • Update GitHub Actions workflows to install dependencies via uv sync and run lint/typecheck/tests/examples via uv run.
  • Add pyproject.toml files for extensions and adjust extension setup.py logic for dev builds.

Reviewed changes

Copilot reviewed 32 out of 33 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tox.ini Removed tox-based env orchestration (lint/typecheck/tests/examples/docs).
setup.py Drops explicit package_data in favor of pyproject.toml setuptools config.
setup.cfg Removed; metadata/deps moved to pyproject.toml.
pyproject.toml Adds PEP 621 project metadata, setuptools config, uv workspace + dependency groups, and mypy config.
mypy.ini Removed; configuration moved under [tool.mypy] in pyproject.toml.
dev-requirements.txt Removed; replaced by uv dependency groups.
examples/validate.sh Runs mechanical-markdown via uv run --group examples.
README.md Updates local dev/test/typecheck/examples/docs instructions to use uv.
AGENTS.md Updates contributor guidance for uv workspace, commands, and CI references.
.github/workflows/validate_examples.yaml Switches example validation to uv sync and direct ./validate.sh invocations.
.github/workflows/build.yaml Migrates lint/typecheck/tests to uv-driven commands.
.github/workflows/build-tag.yaml Migrates lint/typecheck/tests to uv-driven commands; publish step still uses setup.py.
.github/workflows/build-push-to-main.yaml Migrates lint/typecheck/tests to uv-driven commands; publish step still uses setup.py.
.codecov.yml Updates ignored env dir from .tox to .venv.
ext/*/setup.py Removes setup.cfg parsing; adjusts dev install requirements handling.
ext/*/setup.cfg Removed; replaced by extension pyproject.toml.
ext/*/pyproject.toml Adds PEP 621 metadata/deps and setuptools config per extension.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@acroca acroca force-pushed the migrate-to-uv branch 2 times, most recently from 8502379 to 483f1ef Compare March 18, 2026 13:39
@acroca acroca requested a review from Copilot March 18, 2026 13:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the repository’s Python packaging and developer workflow from tox/setup.cfg/dev-requirements to a uv + pyproject.toml-driven setup, and updates CI/docs to match.

Changes:

  • Move core package metadata/dependencies into pyproject.toml (PEP 621) and define a uv workspace + dependency groups.
  • Remove legacy tooling/config (tox.ini, setup.cfg, mypy.ini, dev-requirements.txt) and update docs/scripts to run via uv.
  • Update GitHub Actions workflows to install uv, sync dependency groups, and run tests/examples without tox.

Reviewed changes

Copilot reviewed 34 out of 35 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
tox.ini Removed legacy tox-based orchestration.
setup.cfg Removed core package metadata/dependency source (migrated to pyproject.toml).
setup.py Keeps dev-version suffix behavior; removed package_data argument.
pyproject.toml Adds PEP 621 project metadata, setuptools config, uv workspace/groups, and mypy config.
mypy.ini Removed; mypy config moved into pyproject.toml.
dev-requirements.txt Removed; dev deps moved into uv dependency groups.
examples/validate.sh Runs mechanical-markdown via uv run --group examples.
README.md Updates contributor commands to use uv instead of tox/pip.
AGENTS.md Updates agent/developer guidance to uv + pyproject-based workflow.
.github/workflows/build.yaml CI now installs uv, syncs groups, runs ruff/mypy/tests via uv.
.github/workflows/build-tag.yaml Same CI migration for tag builds; publish job still uses python setup.py ....
.github/workflows/build-push-to-main.yaml Same CI migration for main branch; publish job still uses python setup.py ....
.github/workflows/validate_examples.yaml Uses uv to install deps and runs example validation without tox.
.codecov.yml Updates ignore path from .tox to .venv.
ext/*/setup.cfg Removed extension metadata/dependency sources (migrated to per-extension pyproject.toml).
ext/*/setup.py Reworked to compute dev name/version and rewrite daprdapr-dev for dev builds.
ext/*/pyproject.toml New per-extension package metadata/dependencies + workspace source mapping.
ext/dapr-ext-workflow/AGENTS.md / examples/AGENTS.md Documentation cleanups related to examples/workflow guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@acroca acroca force-pushed the migrate-to-uv branch 2 times, most recently from ca71a28 to 924ed1f Compare March 18, 2026 14:34
@acroca acroca requested a review from Copilot March 18, 2026 14:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the repository from tox/setup.cfg-driven workflows to a uv + pyproject.toml (PEP 621) setup, updating CI and contributor docs accordingly.

Changes:

  • Move core + extension package metadata/dependencies into pyproject.toml files and delete setup.cfg/mypy.ini/dev-requirements.txt/tox.ini.
  • Update GitHub Actions workflows to install via uv sync and run lint/typecheck/tests/examples via uv run.
  • Update contributor documentation and example validation scripts to use uv.

Reviewed changes

Copilot reviewed 34 out of 35 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
tox.ini Removed tox-based test/lint/typecheck/examples orchestration.
setup.py Simplified core setup script; relies on pyproject for metadata; removed package_data.
setup.cfg Removed legacy core package metadata/deps config.
pyproject.toml Added PEP 621 project metadata, dependencies, setuptools config, uv workspace/groups, ruff+mypy config.
mypy.ini Removed legacy mypy config (now in pyproject.toml).
ext/flask_dapr/setup.py Stop reading deps from setup.cfg; hardcode deps and dev dapr-dev rewrite logic.
ext/flask_dapr/setup.cfg Removed legacy extension metadata/deps config.
ext/flask_dapr/pyproject.toml Added extension PEP 621 metadata + deps + setuptools config + uv workspace source.
ext/dapr-ext-workflow/setup.py Stop reading deps from setup.cfg; hardcode deps and dev dapr-dev rewrite logic.
ext/dapr-ext-workflow/setup.cfg Removed legacy extension metadata/deps config.
ext/dapr-ext-workflow/pyproject.toml Added extension PEP 621 metadata + deps + setuptools config + uv workspace source.
ext/dapr-ext-workflow/AGENTS.md Updated docs to reference pyproject.toml instead of setup.cfg.
ext/dapr-ext-strands/setup.py Stop reading deps from setup.cfg; hardcode deps and dev dapr-dev rewrite logic.
ext/dapr-ext-strands/setup.cfg Removed legacy extension metadata/deps config.
ext/dapr-ext-strands/pyproject.toml Added extension PEP 621 metadata + deps + setuptools config + uv workspace source.
ext/dapr-ext-langgraph/setup.py Stop reading deps from setup.cfg; hardcode deps and dev dapr-dev rewrite logic.
ext/dapr-ext-langgraph/setup.cfg Removed legacy extension metadata/deps config.
ext/dapr-ext-langgraph/pyproject.toml Added extension PEP 621 metadata + deps + setuptools config + uv workspace source.
ext/dapr-ext-grpc/setup.py Stop reading deps from setup.cfg; hardcode deps and dev dapr-dev rewrite logic.
ext/dapr-ext-grpc/setup.cfg Removed legacy extension metadata/deps config.
ext/dapr-ext-grpc/pyproject.toml Added extension PEP 621 metadata + deps + setuptools config + uv workspace source.
ext/dapr-ext-fastapi/setup.py Stop reading deps from setup.cfg; hardcode deps and dev dapr-dev rewrite logic.
ext/dapr-ext-fastapi/setup.cfg Removed legacy extension metadata/deps config.
ext/dapr-ext-fastapi/pyproject.toml Added extension PEP 621 metadata + deps + setuptools config + uv workspace source.
examples/validate.sh Run mechanical-markdown via uv run --group examples.
examples/AGENTS.md Updated example-running guidance to reflect CI workflow (not tox).
dev-requirements.txt Removed legacy dev dependency list (moved to uv dependency group).
README.md Updated build/test/docs instructions to use uv commands.
AGENTS.md Updated repo contributor guide to use uv and pyproject-based tooling.
.github/workflows/validate_examples.yaml Switched examples CI job from tox to uv sync + direct validate.sh calls.
.github/workflows/build.yaml Switched CI to uv sync + uv run for ruff/mypy/tests/coverage.
.github/workflows/build-tag.yaml Switched CI to uv; publish now uses python -m build (PEP 517).
.github/workflows/build-push-to-main.yaml Switched CI to uv; publish now uses python -m build (PEP 517).
.codecov.yml Update ignored env directory from .tox to .venv.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +18 to +21
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel tox
run: uv sync --all-packages --group dev
Comment on lines +34 to +36
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
Source = "https://github.com/dapr/python-sdk"

[build-system]
requires = ["setuptools>=61.0"]
Source = "https://github.com/dapr/python-sdk"

[build-system]
requires = ["setuptools>=61.0"]
Source = "https://github.com/dapr/python-sdk"

[build-system]
requires = ["setuptools>=61.0"]
## Extension overview

Each extension is a **separate PyPI package** with its own `setup.cfg`, `setup.py`, `tests/`, and `AGENTS.md`.
Each extension is a **separate PyPI package** with its own `pyproject.toml`, `setup.py`, `tests/`, and `AGENTS.md`.
Source = "https://github.com/dapr/python-sdk"

[build-system]
requires = ["setuptools>=61.0"]
Comment on lines +53 to +56
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel tox
run: uv sync --all-packages --group dev
Source = "https://github.com/dapr/python-sdk"

[build-system]
requires = ["setuptools>=61.0"]
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine tox
run: uv sync --all-packages --group examples
Signed-off-by: Albert Callarisa <albert@diagrid.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants